package com.cw.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cw.dto.InpatientRegistrationCondition;
import com.cw.entity.BedUggIeCWInfo;
import com.cw.entity.CwglPrepayin;
import com.cw.entity.ThisIiInmaininfo;
import com.cw.request.BedUggieRequest;
import com.cw.request.PrintHospitalCertificateRequest;
import com.github.pagehelper.PageInfo;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * II_住院主表 服务类
 * </p>
 *
 * @author smq
 * @since 2021-05-05
 */
public interface IThisIiInmaininfoService extends IService<ThisIiInmaininfo> {


    /**
     * 根据床位id获取病人就诊号
     *
     * @param bedId
     * @return
     */
    ThisIiInmaininfo getVisitNo(String bedId);

    /**
     * 根据床位ids已登记床位
     *
     * @param bedIds
     * @return
     */
    List<ThisIiInmaininfo> getRegisterBedByBedIds(List<String> bedIds);


    /**
     * 根据床位id获取病人详情
     *
     * @param bedId
     * @return
     */
    ThisIiInmaininfo getPatientDetail(String bedId);


    /**
     * 住院登记记录-已登记列表
     *
     * @param condition 查询条件
     * @return java.util.Map<java.lang.String, java.lang.Object>
     * @author ly
     * @date 2021/5/6 14:20
     */
    Map<String, Object> getThisIiInmaininfoPagination(InpatientRegistrationCondition condition);



    /**
     * 住院证打印
     * @param condition 查询条件
     * @return java.util.Map<java.lang.String, java.lang.Object>
     * @author xnd
     * @date 2021/10/19
     */

    Map<String, Object> getPrintHospitalCertificate(PrintHospitalCertificateRequest condition);

    /**
     * 根据病人id获取病人详情
     *
     * @param preId
     * @param isNotChange
     * @return
     */
    CwglPrepayin getPatient(String preId, String isNotChange);

    /**
     * 入院列表
     * <h3>只查询本系统录入的数据<h3/>
     * @param condition 查询条件
     * @author ly
     * @date 2021/07/14 14:38
     * @return java.util.Map<com.cw.entity.ThisIiInmaininfo>
     */
    Map<String,Object> getHospitalized(InpatientRegistrationCondition condition);

    /**
     * 出院列表
     * <h3>只查询本系统录入的数据<h3/>
     * @param condition 查询条件
     * @author ly
     * @date 2021/07/14 15:40
     * @return java.util.Map<com.cw.entity.ThisIiInmaininfo>
     */
    Map<String,Object> getLeaveHospital(InpatientRegistrationCondition condition);

    /**
     * 获取在床人员信息
     * <h3>只查询本系统录入的数据<h3/>
     * @param bedList 查询条件
     * @return com.github.pagehelper<com.cw.entity.ThisIiInmaininfo>
     * @author cww
     * @date 2021/08/02
     */
    List<ThisIiInmaininfo> getInBedInfo(List<String> bedList);



    /**
     * @author xnd
     * @since 2021-10-28
     * 床位异动验证，是不是转病区的患者
     */

    PageInfo<BedUggIeCWInfo> getBedUggIeCW(BedUggieRequest request);

    /**
     * @author xnd
     * @since 2021-10-28
     * 床位异动EXCEL打印下载
     */

    void getBedUggIeCWDownLoadExcel(BedUggieRequest requestInfo)throws IOException;

}
